package com.aerotechnic.service.implementation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.aerotechnic.dao.implementation.VisiteDao;
import com.aerotechnic.entities.Visite;
import com.aerotechnic.service.interfaces.VisiteBoIn;

@Service("VisiteBo")
@Transactional
public class VisiteBo implements VisiteBoIn {

	@Autowired
	private VisiteDao visiteDao ;

	@Override
	public void save(Visite myEntity) {
		// TODO Auto-generated method stub
		visiteDao.save(myEntity);
		
	}

	@Override
	public void update(Visite myEntity) {
		// TODO Auto-generated method stub
		visiteDao.update(myEntity);
	}

	@Override
	public void delete(Long id) {
		// TODO Auto-generated method stub
		visiteDao.delete(id);
	}

	@Override
	public Visite findByID(Long id) {
		// TODO Auto-generated method stub
		return visiteDao.findByID(id);
	}

	@Override
	public List<Visite> findAll() {
		// TODO Auto-generated method stub
		return visiteDao.findAll();
	}

	@Override
	public Visite getlastVisite() {
		// TODO Auto-generated method stub
		return  visiteDao.getlastVisite();
	}
}
